package com.alinesno.cloud.monitor.agent.enable;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

import com.alinesno.cloud.monitor.agent.collect.DatasourceConfig;
import com.alinesno.cloud.monitor.agent.collect.WatcherControllerMethonAspect;
import com.alinesno.cloud.monitor.agent.collect.WatcherSQLStatLogger;
import com.alinesno.cloud.monitor.agent.collect.WatcherServiceMethonAspect;
import com.alinesno.cloud.monitor.agent.collect.WatcherStatusHeartbeatReport;
import com.alinesno.cloud.monitor.agent.tool.SpringContextUtil;

/**
 * 引入自动类
 * @author WeiXiaoJin
 * @sine 2019年4月5日 下午3:34:07
 */
public class LoggerConfigurationSelector implements ImportSelector {

	@Override
	public String[] selectImports(AnnotationMetadata importingClassMetadata) {
		List<String> importBean = new ArrayList<String>() ; 
	
		importBean.add(SpringContextUtil.class.getName()) ; 
		
		// common web 
		importBean.add(WatcherServiceMethonAspect.class.getName()) ; 
		importBean.add(WatcherStatusHeartbeatReport.class.getName()) ; 
		importBean.add(WatcherControllerMethonAspect.class.getName()) ; 
	
		// datasql monitor
		importBean.add(DatasourceConfig.class.getName()) ; 
		importBean.add(WatcherSQLStatLogger.class.getName()) ; 
		
		return importBean.toArray(new String[] {}) ;
	}
	
}
